package day0927;

import java.util.TreeSet;

class Person1  implements  Comparable{
    int  weight;
    public int compareTo(Object o) {
        return  this.weight-((Person1)o).weight;
    }
}//1.

public class P1 {
    public static void main(String[] args) {
        TreeSet<Person1>  set=new TreeSet<>();//2.
        Person1  zs=new Person1();  zs.weight=104;  set.add(zs);
        Person1  lisi=new Person1(); lisi.weight=94;   set.add(lisi);
    }
}
